package com.glsc.ngateway.common.base.domain.mysql.gateway.oaflow;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.time.LocalDateTime;


@Entity
@Table(name = "t_fixedincome_process")
public class TFixedincomeProcess {

    // 自增ID
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    @Column(name = "task_id")
    private String taskId;

    @Column(name = "node_id")
    private String nodeId;

    @Column(name = "work_flow_id")
    private String workFlowId;

    @Column(name = "request_id")
    private String requestId;

    @Column(name = "user_id")
    private String userId;

    //0oa创建流程  1流程处理成功完毕 2处理失败完毕 3撤单归档
    @Column(name = "status")
    private String status;

    //只记录0，1 表示处理过或者未处理
    @Column(name = "fix_status")
    private String fixStatus = "0";
    //只记录0，1 表示处理过或者未处理
    @Column(name = "oa_status")
    private String oaStatus = "0";

    @Column(name = "create_time", columnDefinition = "datetime comment '创建时间'")
    @org.hibernate.annotations.CreationTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime createTime;

    @Column(name = "update_time", columnDefinition = "datetime comment '更新时间'")
    @org.hibernate.annotations.UpdateTimestamp
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

    @Column(name = "trade_id")
    private String tradeId;

    @Column(name = "business_content")
    private String businessContent;

    @Column(name = "group_info")
    private String groupInfo;

    @Column(name = "group_id")
    private String groupId;

    @Column(name = "group_name")
    private String groupName;

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getFixStatus() {
        return fixStatus;
    }

    public void setFixStatus(String fixStatus) {
        this.fixStatus = fixStatus;
    }

    public String getOaStatus() {
        return oaStatus;
    }

    public void setOaStatus(String oaStatus) {
        this.oaStatus = oaStatus;
    }

    public String getTradeId() {
        return tradeId;
    }

    public String getGroupInfo() {
        return groupInfo;
    }

    public void setGroupInfo(String groupInfo) {
        this.groupInfo = groupInfo;
    }

    public void setTradeId(String tradeId) {
        this.tradeId = tradeId;
    }

    public String getBusinessContent() {
        return businessContent;
    }

    public void setBusinessContent(String businessContent) {
        this.businessContent = businessContent;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    public String getWorkFlowId() {
        return workFlowId;
    }

    public void setWorkFlowId(String workFlowId) {
        this.workFlowId = workFlowId;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "TFixedincomeProcess{" +
                "id=" + id +
                ", taskId='" + taskId + '\'' +
                ", nodeId='" + nodeId + '\'' +
                ", workFlowId='" + workFlowId + '\'' +
                ", requestId='" + requestId + '\'' +
                ", userId='" + userId + '\'' +
                ", status='" + status + '\'' +
                ", fixStatus='" + fixStatus + '\'' +
                ", oaStatus='" + oaStatus + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", tradeId='" + tradeId + '\'' +
                ", businessContent='" + businessContent + '\'' +
                ", groupInfo='" + groupInfo + '\'' +
                ", groupId='" + groupId + '\'' +
                ", groupName='" + groupName + '\'' +
                '}';
    }
}
